<h1>Hiding The Admin Login URL<br></h1>
<p>The default admin login URL for Trongate websites is made up of a base URL followed by <strong>trongate_administrators/login</strong>. However, a base URL followed by <strong>tg-admin</strong> will also work. This shorter URL is made possible by the custom_routing.php file, which is inside the config directory.</p>
<p>If somebody tried to hack into your admin panel then you can be sure that they would focus on entry points such as your default admin login and the URL for receiving post requests from your admin login. Of course, if a malicious user knows your login URL for your admin panel then it does not mean that they have successfully hacked your site. It merely means that they have a good starting point to carry out their diabolical deeds.</p>
<p>With this in mind, it's a good practice to make your login URL secret and - hopefully - impossible to guess. Doing this is would make life much more difficult for a would-be hacker.</p>
<h2>How To Create A Secret Admin Login URL</h2>
<p><strong>STEP 1: Think of a word that is difficult to guess but meaningful and easy to remember for the site owner.</strong></p>
<p>This could be an entirely made-up word or a word that's made of a combination of two words. Avoid spaces or any unusual characters. For the moment, let's assume that our secret word is going to be <strong>fantasticola</strong>. This means that to log into our site admin panel, the URL should be:</p>
<p>The base URL, followed by 'fantasticola', e.g., example.com/fantasticola<br></p>
<p><strong>STEP 2: Modify custom_routing.php </strong></p>
<p>The next step is to modify your custom_routing.php file, which is inside your config directory. Simply replace all instances of 'tg-admin' with 'fantasticola' (or whatever your secret world may be).</p>
<p>For example, here's some sample code from custom_routing.php:</p>
<p>
[code=php]&lt;?php
$routes = [
  "tg-admin" =&gt; "trongate_administrators/login",
  "tg-admin/submit_login" =&gt; "trongate_administrators/submit_login"
];

define("CUSTOM_ROUTES", $routes);[/code]
</p>
<p>The code above would be changed to:<br>
[code=php]&lt;?php
$routes = [
  "fantasticola" =&gt; "trongate_administrators/login",
  "fantasticola/submit_login" =&gt; "trongate_administrators/submit_login"
];

define("CUSTOM_ROUTES", $routes);[/code]
</p>
<p><strong>Step 3: Modify and uncomment the secret login declaration on 'Trongate_administrators.php'</strong></p>
<p>Finally, open up Trongate_administrators.php. If you are using version 1.3.3031 or higher then around line 5 could should see the following code:</p>
<p>[code=php]//private $secret_login_segment = "tg-admin";
    [/code]
</p>
<p>Uncomment this line and change the secret login segment to your chosen word. For example:</p>
<p>[code=php]private $secret_login_segment = "fantasticola";
    [/code]
</p>
<p><strong>That's it!</strong></p>
<p>If you have followed these instructions and you are using Trongate version 1.3.3031 or higher then the trongate_administrators/login page will produce a 404 error. In order to access your admin login URL, users would have to go to your base URL followed by your secret word.</p>